﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcProject.Models.ProjectInfo>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Delete
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>项目删除</h2>

    <h3>确定要删除该项目及项目中包含的合同、班组等信息?</h3>
    <fieldset>
        <legend>项目信息</legend>
        <div class="display-label">
            总包单位</div>
        <div class="display-field">
            <%: Model.TotalUnitName %></div>
        <div class="display-label">
            分包单位</div>
        <div class="display-field">
            <%: Model.SubUnitName %></div>
        <div class="display-label">
            分包单位部门</div>
        <div class="display-field">
            <%: Model.SubUnitDepartmentId %></div>
        <div class="display-label">
            工程类别</div>
        <div class="display-field">
            <%: Model.ProjectTypeId %></div>
        <div class="display-label">
            项目名称</div>
        <div class="display-field">
            <%: Model.ProjectName %></div>
        <div class="display-label">
            工程地址</div>
        <div class="display-field">
            <%: Model.ProjectAddress %></div>
        <div class="display-label">
            项目金额</div>
        <div class="display-field">
            <%: Model.ProjectMoney %></div>
        <div class="display-label">
            项目概述</div>
        <div class="display-field">
            <%: Model.ProjectNote %></div>
        <div class="display-label">
            项目状态</div>
        <div class="display-field">
            <%: Model.ProjectStatus %></div>
        <div class="display-label">
            项目负责人</div>
        <div class="display-field">
            <%: Model.ProjectLeader %></div>
        <div class="display-label">
            项目负责人身份证号</div>
        <div class="display-field">
            <%: Model.PorjectLeaderCardId %></div>
        <div class="display-label">
            技术负责人</div>
        <div class="display-field">
            <%: Model.TechnologyLeader %></div>
        <div class="display-label">
            技术负责人身份证号</div>
        <div class="display-field">
            <%: Model.TechnologyLeaderCardId %></div>
        <div class="display-label">
            安全负责人</div>
        <div class="display-field">
            <%: Model.SecurityLeader %></div>
        <div class="display-label">
            安全负责人身份证号</div>
        <div class="display-field">
            <%: Model.SecurityLeaderCardId %></div>
        <div class="display-label">
            资料负责人</div>
        <div class="display-field">
            <%: Model.DataLeader %></div>
        <div class="display-label">
            资料负责人身份证号</div>
        <div class="display-field">
            <%: Model.DataLeaderCardId %></div>
        <div class="display-label">
            创建人</div>
        <div class="display-field">
            <%: Model.CreateUserName %></div>
        <div class="display-label">
            创建时间</div>
        <div class="display-field">
            <%: String.Format("{0:g}", Model.CreateDate) %></div>
        <div>
            <table>
                <tr>
                    <th>
                        合同类型
                    </th>
                    <th>
                        合同名称
                    </th>
                    <th>
                        合同开始时间
                    </th>
                    <th>
                        合同结束时间
                    </th>
                    <th>
                        合同金额
                    </th>
                    <th>
                        创建人
                    </th>
                    <th>
                        创建时间
                    </th>
                </tr>
                <%
                    IEnumerable<MvcProject.Models.ContractInfo> ContractInfos = (IEnumerable<MvcProject.Models.ContractInfo>)ViewData["ContractInfos"];
                    if (ContractInfos != null) foreach (var item in ContractInfos)
                        { %>
                <tr>
                    <td>
                        <%: item.ContractType == 1 ? "项目合同" : "人员合同"%>
                    </td>
                    <td>
                        <%: item.ContractName %>
                    </td>
                    <td>
                        <%: String.Format("{0:g}", item.ContractStartDate) %>
                    </td>
                    <td>
                        <%: String.Format("{0:g}", item.ContractEndDate) %>
                    </td>
                    <td>
                        <%: item.ContractMoney %>
                    </td>
                    <td>
                        <%: item.CreateUserName %>
                    </td>
                    <td>
                        <%: String.Format("{0:g}", item.CreateDate) %>
                    </td>
                </tr>
                <% } %>
            </table>
        </div>
        <div>
            <table>
                <tr>
                    <th>
                        班组名称
                    </th>
                    <th>
                        班组负责人
                    </th>
                    <th>
                        班级负责人身份证号
                    </th>
                    <th>
                        创建人
                    </th>
                    <th>
                        创建时间
                    </th>
                </tr>
                <%
                    IEnumerable<MvcProject.Models.Team> Teams = (IEnumerable<MvcProject.Models.Team>)ViewData["Teams"];
                    if (Teams != null) foreach (var item in Teams)
                        { %>
                <tr>
                    <td>
                        <%: item.TeamName %>
                    </td>
                    <td>
                        <%: item.TeamLeader %>
                    </td>
                    <td>
                        <%: item.TeamLeaderCardId %>
                    </td>
                    <td>
                        <%: item.CreateUserName %>
                    </td>
                    <td>
                        <%: String.Format("{0:g}", item.CreateDate) %>
                    </td>
                </tr>
                <% } %>
            </table>
        </div>
    </fieldset>
    <% using (Html.BeginForm()) { %>
        <p>
		    <input type="submit" value="删除" /> |
		    <%: Html.ActionLink("返回项目列表", "Index") %>
        </p>
    <% } %>

</asp:Content>

